package cl.lexer.validator;

import cl.lexer.Token;
import cl.lexer.TokenType;

public class SemicolonValidator implements TokenValidator {

    @Override
    public TokenType getType() {
        return TokenType.SEMICOLON;
    }

    @Override
    public boolean isValid(String value) {
        return ";".equals(value);
    }

    @Override
    public boolean possiblyValid(String value) {
        return isValid(value) || value.isEmpty();
    }

    @Override
    public Token generateToken(String value) {
        return new Token(TokenType.SEMICOLON, value);
    }

}
